]> git.r.bdr.sh - rbdr/map/blame - Map/Presentation/Base Components/EvolutionPicker.swift
Map 3 first commit: files, groups and layout
[rbdr/map] / Map / Presentation / Base Components / EvolutionPicker.swift
CommitLineData
77d0155b
RBR
1import SwiftUI
2
3struct EvolutionPicker: View {
4
e2c37ac1 5 @Binding var selectedEvolution: StageType
77d0155b
RBR
6
7 var body: some View {
e2c37ac1 8 Picker("Evolution", selection: $selectedEvolution) {
77d0155b 9 ForEach(StageType.types) { stage in
e2c37ac1 10 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b
RBR
11 }
12 Divider()
13 ForEach(StageType.characteristics) { stage in
e2c37ac1 14 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0).font(.theme.body)
77d0155b
RBR
15 }
16 Divider()
17 ForEach(StageType.properties) { stage in
e2c37ac1 18 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b
RBR
19 }
20 Divider()
21 ForEach(StageType.custom) { stage in
e2c37ac1 22 Text(Stage.title(stage)).font(.theme.body).tag(stage).padding(4.0)
77d0155b 23 }
e2c37ac1 24 }.font(.theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
77d0155b
RBR
25 }
26}
27
e2c37ac1
RBR
28#Preview {
29 let selectedEvolution: StageType = .behavior
30 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))
77d0155b 31}